curl --request PUT \
--url https://api.example.com/api/categorias/{nombre} \
--header 'Content-Type: application/json' \
--data '
{
"nombre": "<string>",
"slug": "<string>"
}
'{
"200": {},
"400": {},
"401": {},
"403": {},
"404": {},
"categoria_id": 123,
"nombre": "<string>",
"slug": "<string>",
"productos": [
{
"producto_id": 123,
"nombre": "<string>"
}
]
}Update an existing product category
curl --request PUT \
--url https://api.example.com/api/categorias/{nombre} \
--header 'Content-Type: application/json' \
--data '
{
"nombre": "<string>",
"slug": "<string>"
}
'{
"200": {},
"400": {},
"401": {},
"403": {},
"404": {},
"categoria_id": 123,
"nombre": "<string>",
"slug": "<string>",
"productos": [
{
"producto_id": 123,
"nombre": "<string>"
}
]
}Authorization: Bearer YOUR_ADMIN_TOKEN
{
"nombre": "Consumer Electronics",
"slug": "consumer-electronics"
}
{
"categoria_id": 1,
"nombre": "Consumer Electronics",
"slug": "consumer-electronics",
"productos": [
{
"producto_id": 101,
"nombre": "Laptop"
},
{
"producto_id": 102,
"nombre": "Smartphone"
}
]
}
curl -X PUT https://api.iquea.com/api/categorias/Electronics \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_ADMIN_TOKEN" \
-d '{
"nombre": "Consumer Electronics",
"slug": "consumer-electronics"
}'